Conversation
Solar SystemWhat We're Looking For
Great job! The code looks pretty good and the project functions as we expected :) The project uses two classes ( Lastly, the theme of this project was so good :) |
|
|
||
| class SfWorld | ||
| attr_accessor :name, :author, :first_book, :year, :lifeforms | ||
| def initialize (name, author, first_book, year, lifeforms) |
There was a problem hiding this comment.
This is just a small comment--
when I open this code in Atom on my computer, Atom puts a little squiggly underline underneath this line giving me a warning. (It doesn't affect my code running or anything, just gives me a warning). If you see that squiggly underline on your computer too and it bothers you, it's simply because Atom thinks there shouldn't be a space between def initialize and the ( parenthesis character, and it wants it to look like:
def initialize(name, author, first_book, year, lifeforms)instead of
def initialize (name, author, first_book, year, lifeforms)like i said, not a big deal though :P
Solar System
Congratulations! You're submitting your assignment.
Comprehension Questions
initializemethod in your class?To make sure that all instances of the class were imbued with the specified instance variables as soon as they were created.
| Describe an instance variable you used and what you used it for. |
The @year instance variable held the year that a book describing a given planet was published.
| Describe what the difference would be if your
SolarSystemused anArrayvs aHash. |(Does this refer to Wave 1? Because the finished Wave 3 version has classes and arrays but no hashes.) In Wave 2, having a hash allowed us to save specific details about each planet under a system of keys. But we were able to do substantially the same thing using class variables in the final, Wave 3 version.)
| Do you feel like you used consistent formatting throughout your code? |
I certainly tried to do that.